# -*- encoding: utf-8 -*-
from piston.decorator import decorator

def login_required():
    """
    """
    @decorator
    def wrap(f, self, request, *args, **kwargs):
        if request.user.is_authenticated():
            return f(self, request, *args, **kwargs)
        else:
            return rc.FORBIDDEN        
    return wrap
